
#include "ItemManager.h"
#include "GameDanger.h"


ItemManager* gItemManager = F_NULL;




MapCommand ItemManager::mCommands;
ItemDataMap ItemManager::mItemDataMap;


ItemManager::ItemManager()
{
	gItemManager = this;

	mCommands["ITEM_useImprecate"] = CommandItemUseImprecate;
	mCommands["ITEM_Constitution"] = CommandItemConstitution;
	mCommands["ITEM_contract"] = CommandItemContract;
	mCommands["ITEM_MapEffect"] = CommandItemMapEffect;
	mCommands["ITEM_metamo"] = CommandItemMetamo;
	mCommands["ITEM_petFollow"] = CommandItemPetFollow;
	mCommands["ITEM_randEnemyEquipOne"] = CommandItemRandEnemyEquipOne;
	mCommands["ITEM_Refresh"] = CommandItemRefresh;
	mCommands["ITEM_timeticket"] = CommandItemTimeTicket;
	mCommands["ITEM_useCaptureUp"] = CommandItemUseCaptureUp;
	mCommands["ITEM_useDeathcounter"] = CommandItemUseDeathCounter;
	mCommands["ITEM_useEncounter"] = CommandItemUseEncounter;
	mCommands["ITEM_useFieldChange"] = CommandItemUseFieldChange;
	mCommands["ITEM_useFusionEditBase"] = CommandItemUseFusionEditBase;
	mCommands["ITEM_useLearnRideCode"] = CommandItemUseLearnRideCode;
	mCommands["ITEM_useMagic"] = CommandItemUseMagic;
	mCommands["ITEM_useMaxRedSocks"] = CommandItemUseMaxRedSocks;
	mCommands["ITEM_useMaxRedSocksNew"] = CommandItemUseMaxRedSocksNew;
	mCommands["ITEM_useMic"] = CommandItemUseMic;
	mCommands["ITEM_useMRecovery"] = CommandItemUseMRecovery;
	mCommands["ITEM_useNoenemy"] = CommandItemUseNoEnemy;
	mCommands["ITEM_useOtherEditBase"] = CommandItemUseOtherEditBase;
	mCommands["ITEM_useRenameItem"] = CommandItemUseRenameItem;
	mCommands["ITEM_useRessurect"] = CommandItemUseRessurect;
	mCommands["ITEM_useSkillCanned"] = CommandItemUseSkillCanned;
	mCommands["ITEM_useSkup"] = CommandItemUseSkup;
	mCommands["ITEM_useWarp"] = CommandItemUseWarp;
	mCommands["ITEM_useWarpForNum"] = CommandItemUseWarpForNum;
	mCommands["ITEM_WaterWordStatus"] = CommandItemWaterWordStatus;
	mCommands["ITEM_useRecovery"] = CommandItemUseRecovery;
	mCommands["ITEM_useStatusRecovery"] = CommandItemUseStatusRecovery;
	mCommands["ITEM_useStatusChange"] = CommandItemUseStatusChange;
	mCommands["ITEM_Addexp"] = CommandItemAddExp;




	mCommands["ITEM_equipNoenemy"] = CommandItemEquipNoEnemy;
	mCommands["ITEM_remNoenemy"] = CommandItemRemNoEnemy;
	mCommands["ITEM_MagicEquitWear"] = CommandItemMagicEquipWear;
	mCommands["ITEM_MagicEquitReWear"] = CommandItemMagicEquitReWear;
	mCommands["ITEM_MagicResist"] = CommandItemMagicResist;
	mCommands["ITEM_MagicReResist"] = CommandItemMagicReResist;
	mCommands["ITEM_randEnemyEquip"] = CommandItemRandEnemyEquip;
	mCommands["ITEM_RerandEnemyEquip"] = CommandItemReRandEnemyEquip;
	mCommands["ITEM_suitEquip"] = CommandItemSuitEquip;
	mCommands["ITEM_ResuitEquip"] = CommandItemReSuitEquip;
	mCommands["ITEM_WearEquip"] = CommandItemWearEquip;
	mCommands["ITEM_ReWearEquip"] = CommandItemReWearEquip;
	mCommands["ITEM_dropDice"] = CommandItemDropDice;
	mCommands["ITEM_pickupDice"] = CommandItemPickupDice;
	mCommands["ITEM_PutOrnaments"] = CommandItemPutOrnaments;
	mCommands["ITEM_DIErelife"] = CommandItemDieRelife;


	for ( fint32 i = 0 ; i < SAIT_COUNT ; ++i )
	{
		ItemCount[ i ] = 1;
	}

	ItemCount[ SAIT_DISH ] = 999;
	ItemCount[ SAIT_OTHER ] = 999;
	ItemCount[ SAIT_METAL ] = 999;

}


ItemManager::~ItemManager()
{
	
}


fvoid			ItemManager::Load( const fbyte* path )
{
    ptree pt;
    ptree root;
    
    read_xml( path , pt , boost::property_tree::xml_parser::trim_whitespace );
    
    FLOG4( "xml loading. %s" , path );
    
    root = pt.get_child( "root" );
    
    ptree::assoc_iterator iter = root.ordered_begin();
    
    for (  ; iter != root.not_found() ; ++iter )
    {
        ItemData data;
        
        ptree n = iter->second;
        
        data.UseType = n.get< fint32 >( "<xmlattr>.useType" , 0 );
        data.SuitEquip = n.get< fint32 >( "<xmlattr>.drop" , 0 );
        
        data.ID = n.get< fint32 >( "<xmlattr>.id" , 0 );
        data.Quaint = n.get< fint32 >( "<xmlattr>.quaint" , 0 );
        data.Px = n.get< fint32 >( "<xmlattr>.px" , 0 );
        data.Py = n.get< fint32 >( "<xmlattr>.py" , 0 );
        data.Img = n.get< fint32 >( "<xmlattr>.img" , 0 );
        data.Sell = n.get< fint32 >( "<xmlattr>.sell" , 0 );
        data.Type = n.get< fint32 >( "<xmlattr>.type" , 0 );
        data.Stage = n.get< fint32 >( "<xmlattr>.stage" , 0 );
        data.Range = n.get< fint32 >( "<xmlattr>.range" , 0 );
        data.Level = n.get< fint32 >( "<xmlattr>.level" , 0 );
        data.Num = n.get< fint32 >( "<xmlattr>.num" , 0 );
        data.AlchemyAttr = n.get< fint32 >( "<xmlattr>.alchemyAttr" , 0 );
        
        data.Suit = n.get< fint32 >( "<xmlattr>.suit" , 0 );
        data.Perdure1 = n.get< fint32 >( "<xmlattr>.perdure1" , 0 );
        data.Perdure2 = n.get< fint32 >( "<xmlattr>.perdure2" , 0 );
        data.Increase = n.get< fint32 >( "<xmlattr>.increase" , 0 );
        data.Decrease = n.get< fint32 >( "<xmlattr>.decrease" , 0 );
        data.Code = n.get< fint32 >( "<xmlattr>.code" , 0 );
        data.AttackNum1 = n.get< fint32 >( "<xmlattr>.attackNum1" , 0 );
        data.AttackNum2 = n.get< fint32 >( "<xmlattr>.attackNum2" , 0 );
        data.Str1 = n.get< fint32 >( "<xmlattr>.str1" , 0 );
        data.Str2 = n.get< fint32 >( "<xmlattr>.str2" , 0 );
        data.Tgh1 = n.get< fint32 >( "<xmlattr>.tgh1" , 0 );
        data.Tgh2 = n.get< fint32 >( "<xmlattr>.tgh2" , 0 );
        data.Dex1 = n.get< fint32 >( "<xmlattr>.dex1" , 0 );
        data.Dex2 = n.get< fint32 >( "<xmlattr>.dex2" , 0 );
        data.Hp1 = n.get< fint32 >( "<xmlattr>.hp1" , 0 );
        data.Hp2 = n.get< fint32 >( "<xmlattr>.hp2" , 0 );
        data.Mp1 = n.get< fint32 >( "<xmlattr>.mp1" , 0 );
        data.Mp2 = n.get< fint32 >( "<xmlattr>.mp2" , 0 );
        data.Luck1 = n.get< fint32 >( "<xmlattr>.luck1" , 0 );
        data.Luck2 = n.get< fint32 >( "<xmlattr>.luck2" , 0 );
        data.Charm1 = n.get< fint32 >( "<xmlattr>.charm1" , 0 );
        data.Charm2 = n.get< fint32 >( "<xmlattr>.charm2" , 0 );
        data.Dodge1 = n.get< fint32 >( "<xmlattr>.dodge1" , 0 );
        data.Dodge2 = n.get< fint32 >( "<xmlattr>.dodge2" , 0 );
        data.AttrType = n.get< fint32 >( "<xmlattr>.attrType" , 0 );
        data.Attr = n.get< fint32 >( "<xmlattr>.attr" , 0 );
        
        data.Magic = n.get< fint32 >( "<xmlattr>.magic" , 0 );
        data.Rare = n.get< fint32 >( "<xmlattr>.rare" , 0 );
        data.Mp = n.get< fint32 >( "<xmlattr>.mp" , 0 );
        data.Ward = n.get< fint32 >( "<xmlattr>.ward" , 0 );
        data.AttackRank = n.get< fint32 >( "<xmlattr>.attackRank" , 0 );
        data.Weight = n.get< fint32 >( "<xmlattr>.weight" , 0 );
        
        data.Poison1 = n.get< fint32 >( "<xmlattr>.poison1" , 0 );
        data.Poison2 = n.get< fint32 >( "<xmlattr>.poison2" , 0 );
        data.Paralysis1 = n.get< fint32 >( "<xmlattr>.paralysis1" , 0 );
        data.Paralysis2 = n.get< fint32 >( "<xmlattr>.paralysis2" , 0 );
        data.Sleep1 = n.get< fint32 >( "<xmlattr>.sleep1" , 0 );
        data.Sleep2 = n.get< fint32 >( "<xmlattr>.sleep2" , 0 );
        data.Stone1 = n.get< fint32 >( "<xmlattr>.stone1" , 0 );
        data.Stone2 = n.get< fint32 >( "<xmlattr>.stone2" , 0 );
        data.Drunk1 = n.get< fint32 >( "<xmlattr>.drunk1" , 0 );
        data.Drunk2 = n.get< fint32 >( "<xmlattr>.drunk2" , 0 );
        data.Confusion1 = n.get< fint32 >( "<xmlattr>.confusion1" , 0 );
        data.Confusion2 = n.get< fint32 >( "<xmlattr>.confusion2" , 0 );
        data.Critical1 = n.get< fint32 >( "<xmlattr>.critical1" , 0 );
        data.Critical2 = n.get< fint32 >( "<xmlattr>.critical2" , 0 );
        
        data.Trade = n.get< fint32 >( "<xmlattr>.trade" , 0 );
        data.Lose = n.get< fint32 >( "<xmlattr>.lose" , 0 );
        data.DropLose = n.get< fint32 >( "<xmlattr>.dropLose" , 0 );
        data.Logout = n.get< fint32 >( "<xmlattr>.logout" , 0 );
        data.Save = n.get< fint32 >( "<xmlattr>.save" , 0 );
        
        data.Store = n.get< fint32 >( "<xmlattr>.store" , 0 );
        data.Alchemy = n.get< fint32 >( "<xmlattr>.alchemy" , 0 );
        
        data.Material[ 0 ] = n.get< fint32 >( "<xmlattr>.material0" , 0 );
        data.MaterialNum[ 0 ] = n.get< fint32 >( "<xmlattr>.materialNum0" , 0 );
        data.Material[ 1 ] = n.get< fint32 >( "<xmlattr>.material1" , 0 );
        data.MaterialNum[ 1 ] = n.get< fint32 >( "<xmlattr>.materialNum1" , 0 );
        data.Material[ 2 ] = n.get< fint32 >( "<xmlattr>.material2" , 0 );
        data.MaterialNum[ 2 ] = n.get< fint32 >( "<xmlattr>.materialNum2" , 0 );
        data.Material[ 3 ] = n.get< fint32 >( "<xmlattr>.material3" , 0 );
        data.MaterialNum[ 3 ] = n.get< fint32 >( "<xmlattr>.materialNum3" , 0 );
        data.Material[ 4 ] = n.get< fint32 >( "<xmlattr>.material4" , 0 );
        data.MaterialNum[ 4 ] = n.get< fint32 >( "<xmlattr>.materialNum4" , 0 );
        
        mItemDataMap[ data.ID ] = data;
        
    }
    
    FLOG4( "xml loaded. %s" , path );
}


ItemData*		ItemManager::GetItemData( fint32 id )
{
	ItemDataMapIter iter = mItemDataMap.find( id );

	if ( iter != mItemDataMap.end() )
	{
		return &iter->second;
	}

	return F_NULL;
}


CommandFun1		ItemManager::GetFun( const fbyte* name )
{
	if ( mCommands.find( name ) == mCommands.end() )
	{
		return F_NULL;
	}

	return mCommands[ name ];
}


fvoid			ItemManager::CommandItemUseImprecate( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemConstitution( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemContract( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemMapEffect( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemMetamo( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemPetFollow( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemRandEnemyEquipOne( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemRefresh( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemTimeTicket( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseCaptureUp( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseDeathCounter( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseEncounter( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseFieldChange( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseFusionEditBase( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseLearnRideCode( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseMagic( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseMaxRedSocks( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseMaxRedSocksNew( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseMic( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseMRecovery( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseNoEnemy( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseOtherEditBase( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseRenameItem( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseRessurect( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseSkillCanned( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseSkup( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseWarp( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseWarpForNum( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemWaterWordStatus( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemUseRecovery( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{
	GameCreature* gc = F_NULL;

	if ( t == SAUIT_PLAYER )
	{
		gc = c;
	}
	else if ( t == SAUIT_PET )
	{
		gc = c->GetPet( p );
	}
	else if ( t == SAUIT_TEAM )
	{
		
	}

	if ( !gc )
	{
		c->AddDanger( GAME_DESTRUCTIVELY_DANGER );
		return;
	}

//	const fbyte* pc = strstr( data->Special.c_str() , "HP" );
//	if ( pc )
//	{
//		pc+= 2;
//		fint32 hp = atoi( pc );
//
//		c->AddHp( hp );
//	}
//
//	pc = strstr( data->Special.c_str() , "MP" );
//	if ( pc )
//	{
//		pc+= 2;
//		fint32 mp = atoi( pc );
//
//		c->AddMp( mp );
//	}
//
//	pc = strstr( data->Special.c_str() , "CM" );
//	if ( pc )
//	{
//		pc+= 2;
//		fint32 mp = atoi( pc );
//
//		c->AddCharm( mp );
//	}
//
//	pc = strstr( data->Special.c_str() , "LY" );
//	if ( pc )
//	{
//		pc+= 2;
//		fint32 mp = atoi( pc );
//
//		c->AddCharm( mp );
//	}


}

fvoid			ItemManager::CommandItemUseStatusRecovery( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{
	GameCreature* gc = F_NULL;

	if ( t == SAUIT_PLAYER )
	{
		gc = c;
	}
	else if ( t == SAUIT_PET )
	{
		gc = c->GetPet( p );
	}
	else if ( t == SAUIT_TEAM )
	{
		
	}

	if ( !gc )
	{
		c->AddDanger( GAME_DESTRUCTIVELY_DANGER );
		return;
	}

// 	const fbyte* pc = strstr( data->Special.c_str() , "PN" );
// 	if ( pc )
// 	{
// 		if ( c->CheckStatus( CFS_POISON ) )
// 		{
// 			c->SetStatus( CFS_NORMAL );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "SE" );
// 	if ( pc )
// 	{
// 		if ( c->CheckStatus( CFS_STONE ) )
// 		{
// 			c->SetStatus( CFS_NORMAL );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "DK" );
// 	if ( pc )
// 	{
// 		if ( c->CheckStatus( CFS_DRUNK ) )
// 		{
// 			c->SetStatus( CFS_NORMAL );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "CN" );
// 	if ( pc )
// 	{
// 		if ( c->CheckStatus( CFS_CONFUSION ) )
// 		{
// 			c->SetStatus( CFS_NORMAL );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "ST" );
// 	if ( pc )
// 	{
// 		if ( c->CheckStatus( CFS_SILENT ) )
// 		{
// 			c->SetStatus( CFS_NORMAL );
// 		}
// 
// 		return;
// 	}


}


fvoid			ItemManager::CommandItemUseStatusChange( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{
	GameCreature* gc = F_NULL;

	if ( t == SAUIT_PLAYER )
	{
		gc = c;
	}
	else if ( t == SAUIT_PET )
	{
		gc = c->GetPet( p );
	}
	else if ( t == SAUIT_TEAM )
	{

	}

	if ( !gc )
	{
		c->AddDanger( GAME_DESTRUCTIVELY_DANGER );
		return;
	}


// 	const fbyte* pc = strstr( data->Special.c_str() , "PN" );
// 	if ( pc )
// 	{
// 		pc = strstr( pc , "turn" );
// 
// 		pc += 4;
// 		fint32 turn = ATOI( pc );
// 		
// 		pc = strstr( pc , "PY" );
// 		pc += 2;
// 
// 		fint32 py = ATOI( pc );
// 
// 		if ( c->CheckStatus( CFS_NORMAL ) )
// 		{
// 			c->SetStatus( CFS_POISON );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "CN" );
// 	if ( pc )
// 	{
// 		pc = strstr( pc , "turn" );
// 
// 		pc += 4;
// 		fint32 turn = ATOI( pc );
// 
// 		pc = strstr( pc , "PY" );
// 		pc += 2;
// 
// 		fint32 py = ATOI( pc );
// 
// 		if ( c->CheckStatus( CFS_NORMAL ) )
// 		{
// 			c->SetStatus( CFS_CONFUSION );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "DK" );
// 	if ( pc )
// 	{
// 		pc = strstr( pc , "turn" );
// 
// 		pc += 4;
// 		fint32 turn = ATOI( pc );
// 
// 		pc = strstr( pc , "PY" );
// 		pc += 2;
// 
// 		fint32 py = ATOI( pc );
// 
// 		if ( c->CheckStatus( CFS_NORMAL ) )
// 		{
// 			c->SetStatus( CFS_DRUNK );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "SE" );
// 	if ( pc )
// 	{
// 		pc = strstr( pc , "turn" );
// 
// 		pc += 4;
// 		fint32 turn = ATOI( pc );
// 
// 		pc = strstr( pc , "PY" );
// 		pc += 2;
// 
// 		fint32 py = ATOI( pc );
// 
// 		if ( c->CheckStatus( CFS_NORMAL ) )
// 		{
// 			c->SetStatus( CFS_STONE );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "SP" );
// 	if ( pc )
// 	{
// 		pc = strstr( pc , "turn" );
// 
// 		pc += 4;
// 		fint32 turn = ATOI( pc );
// 
// 		pc = strstr( pc , "PY" );
// 		pc += 2;
// 
// 		fint32 py = ATOI( pc );
// 
// 		if ( c->CheckStatus( CFS_NORMAL ) )
// 		{
// 			c->SetStatus( CFS_SLEEP );
// 		}
// 
// 		return;
// 	}
// 
// 	pc = strstr( data->Special.c_str() , "ST" );
// 	if ( pc )
// 	{
// 		pc = strstr( pc , "turn" );
// 
// 		pc += 4;
// 		fint32 turn = ATOI( pc );
// 
// 		pc = strstr( pc , "PY" );
// 		pc += 2;
// 
// 		fint32 py = ATOI( pc );
// 
// 		if ( c->CheckStatus( CFS_NORMAL ) )
// 		{
// 			c->SetStatus( CFS_SILENT );
// 		}
// 
// 		return;
// 	}

}


fvoid			ItemManager::CommandItemAddExp( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{
	
}


fvoid			ItemManager::CommandItemEquipNoEnemy( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemRemNoEnemy( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemMagicEquipWear( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemMagicEquitReWear( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemMagicResist( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemMagicReResist( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemRandEnemyEquip( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemReRandEnemyEquip( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemSuitEquip( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemReSuitEquip( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemWearEquip( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemReWearEquip( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemDropDice( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemPickupDice( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemPutOrnaments( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

fvoid			ItemManager::CommandItemDieRelife( ItemData* data , GamePlayer* c , fint32 p , fint32 t )
{

}

